package com.bdqn.t330.ch11.servcie;

import com.bdqn.t330.ch11.entity.Right;
import com.bdqn.t330.ch11.entity.Role;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface RoleService {

    public List<Role> getRoleList();

    //权限查询：查询所有的url地址,在tomcat启动时初始化securityManager时
    //shiroFilterFactory
    public List<Right> findAllRights();

    //在登录后通过用户id去获取该用户的角色在查询出该角色能访问的url
    //自定义relam中的授权方法使用doGetAuthorizationInfo
    public List<Right> findRightsByRole(Role role);

    public Page<Role> getListService(Map<String, Object> param, Pageable pageable);
}
